import App from './App'

// #ifndef VUE3
import Vue from 'vue'

// uview-ui
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
uni.$u.config.unit = 'rpx'

// router
import {router, RouterMount} from '@/router/index.js'
Vue.use(router)

// request
import request  from '@/utils/request.js'
Vue.prototype.$request = request

Vue.config.productionTip = false
App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
// #endif

//v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
// #ifdef H5
RouterMount(app,router,'#app')
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'

// uview-ui
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
uni.$u.config.unit = 'rpx'

// router
import {router, RouterMount} from '@/router/index.js'
Vue.use(router)

// request
import request from '@/utils/request.js'
Vue.prototype.$request = request

export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif